package com.ice.common;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

public class IceProperties {
	
	private IceProperties(){}
	
	
	public static  String getValue(String url,String key){
		IceProperties iceProperties = new IceProperties();
		return iceProperties.setValue(url, key);
	}
	
	
	/**
	 * 
	 * @param url
	 * @param key
	 * @return
	 */
	private  String setValue(String url,String key){
		InputStream inputStream = getClass().getResourceAsStream(url);
		Properties properties = new Properties();
		try {
			properties.load(inputStream);
			return properties.getProperty(key);
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
		return null;
	}
}
